package com.bjpowernode.mvc.service.inter;

import com.bjpowernode.mvc.model.dto.KqBeginDTO;
import org.springframework.data.redis.core.ZSetOperations;

import java.math.BigDecimal;
import java.util.Set;

/**
 * 支付功能的接口
 */
public interface PayService {

    //提供通过网银支付接口所需要的参数
    KqBeginDTO generateApiParam(Integer uid, String token, String phone, BigDecimal payMoney);

    //创建充值记录
    void createRechargeRecord(Integer uid, String orderId, BigDecimal payMoney, String channel);

    //保存订单号到Redis
    void saveOrderIdRedis(String orderId);

    //验证uid和token
    boolean checkUidToken(Integer uid, String token);

    //处理订单
    String handleNotify(String orderId, String payAmount, String payResult);

    void deleteOrderId(String orderId);

    //获取未处理的订单号的集合   Untreated 未处理
    Set<ZSetOperations.TypedTuple<String>> getUntreatedOrderId();

    //对订单进行订单结果的查询
    String executeQueryOrderId(String orderId);

    void modifyRechargeStatus(String orderId, int staRechargeFail);
}
